package com.wh.wisdomsite.xbox.server.listener;


import com.wh.wisdomsite.xbox.common.Constants;
import com.wh.wisdomsite.xbox.utils.properties.PropertiesToolMgr;
import com.wh.wisdomsite.xbox.utils.Const;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;


/***
 * 初始化上下文系统信息
 * @Package com.wh.wisdomsite.xbox.entity.client
 * @author 谢泽鹏
 * @date 2016年11月07日 下午15:10
 * @Copyright 个人版权所有
 * @Company 贵州万华科技有限公司Copyright (c) 2016
 * @version V1.0
 */
public class ContextStartupListener implements ServletContextListener {

        private static final Log logger = LogFactory.getLog(ContextStartupListener.class);


        @Override
        public void contextDestroyed(ServletContextEvent arg0) {

        }

        @Override
        public void contextInitialized(ServletContextEvent event) {
                try {
                        logger.info("上下文初始化-->>contextInitialized-->>开始");
                        //加载属性文件
                        ClassLoader classLoader = ContextStartupListener.class.getClassLoader();
                        //初始化[实名认证]配置
                        PropertiesToolMgr.setFileName("id5.properties");
                        PropertiesToolMgr.initProperties(classLoader);
                        Const.ID5_URL  = PropertiesToolMgr.getPropertiesByKey("id5.url");
                        Const.ID5_USERNAME = PropertiesToolMgr.getPropertiesByKey("id5.username");
                        Const.ID5_PASSWORD = PropertiesToolMgr.getPropertiesByKey("id5.password");
                        logger.info("初始化[实名认证]-->>认证地址: " + Const.ID5_URL);
                        logger.info("初始化[实名认证]-->>账户名: " + Const.ID5_USERNAME);
                        logger.info("初始化[实名认证]-->>账户密码: " + Const.ID5_PASSWORD);


                        //初始化[功能服务器]配置
                        PropertiesToolMgr.setFileName("scoket.properties");
                        PropertiesToolMgr.initProperties(classLoader);
                        Const.SOCKET_SERVER_URL = PropertiesToolMgr.getPropertiesByKey("scoket_url");
                        Const.SOCKET_SERVER_PORT = Integer.parseInt(PropertiesToolMgr.getPropertiesByKey("scoket_port"));
                        logger.info("初始化[功能服务器]-->>链接地址:" + Const.SOCKET_SERVER_URL);
                        logger.info("初始化[功能服务器]-->>链接端口:" + Const.SOCKET_SERVER_PORT);

                        //初始化海康微视配置项
                        PropertiesToolMgr.setFileName("hkws.properties");
                        PropertiesToolMgr.initProperties(classLoader);
                        Const.HKWS_GA_URL = PropertiesToolMgr.getPropertiesByKey("hkws.ga.url");
                        Const.HKWS_GA_RES_PORT = PropertiesToolMgr.getPropertiesByKey("hkws.ga.res.port");
                        Const.HKWS_GA_PROXY_URL = PropertiesToolMgr.getPropertiesByKey("hkws.ga.proxy.url");
                        Const.HKWS_GA_RES_PROXY_PORT = PropertiesToolMgr.getPropertiesByKey("hkws.ga.res.proxy.port");
                        Const.HKWS_GA_OPENAPI_HTTP_URL = PropertiesToolMgr.getPropertiesByKey("hkws.ga.openapi.http.url");
                        Const.HKWS_GA_OPENAPI_HTTPS_URL = PropertiesToolMgr.getPropertiesByKey("hkws.ga.openapi.https.url");
                        Const.HKWS_GA_OPENAPI_SECRET = PropertiesToolMgr.getPropertiesByKey("hkws.ga.openapi.secret");
                        Const.HKWS_GA_OPENAPI_APPKEY = PropertiesToolMgr.getPropertiesByKey("hkws.ga.openapi.appkey");
                        Const.HKWS_GA_DEFAULT_UUID = PropertiesToolMgr.getPropertiesByKey("hkws.ga.defalut.uuid");
                        Const.HKWS_GA_INTERFACE_OPENAPI_SERVICE_BASE_GETDEFAULTUUID = PropertiesToolMgr.getPropertiesByKey("hkws.ga.interface.openapi.service.base.getDefaultUserUuid");
                        Const.HKWS_GA_INTERFACE_OPENAPI_SERVICE_BASE_GETUSERS = PropertiesToolMgr.getPropertiesByKey("hkws.ga.interface.openapi.service.base.user.getUsers");
                        Const.HKWS_GA_INTERFACE_OPENAPI_SERVICE_VSS_RES_GETCAMERAS = PropertiesToolMgr.getPropertiesByKey("hkws.ga.interface.openapi.service.vss.res.getCameras");
                        Const.HKWS_GA_INTERFACE_OPENAPI_SERVICE_VSS_RES_GETCAMERASBYNAME = PropertiesToolMgr.getPropertiesByKey("hkws.ga.interface.openapi.service.vss.res.getCamerasByName");
                        Const.HKWS_GA_INTERFACE_OPENAPI_SERVICE_VSS_RES_GETENCODERDEVICESEX = PropertiesToolMgr.getPropertiesByKey("hkws.ga.interface.openapi.service.vss.res.getEncoderDevicesEx");
                        Const.HKWS_GA_INTERFACE_OPENAPI_SERVICE_VSS_PICTURE_BLGCAPTUREPIC = PropertiesToolMgr.getPropertiesByKey("hkws.ga.interface.openapi.service.vss.picture.blgCapturePic");
                        logger.info("初始化[贵安-海康微视]-->>海康服务器地址:" + Const.HKWS_GA_URL);
                        logger.info("初始化[贵安-海康微视]-->>海康服务器视频端口:" + Const.HKWS_GA_RES_PORT);
                        logger.info("初始化[贵安-海康微视]-->>海康服务器代理地址:" + Const.HKWS_GA_URL);
                        logger.info("初始化[贵安-海康微视]-->>海康服务器视频代理端口:" + Const.HKWS_GA_RES_PORT);
                        logger.info("初始化[贵安-海康微视]-->>请求URL地址HTTP:" + Const.HKWS_GA_OPENAPI_HTTP_URL);
                        logger.info("初始化[贵安-海康微视]-->>请求URL地址HTTPS:" + Const.HKWS_GA_OPENAPI_HTTPS_URL);
                        logger.info("初始化[贵安-海康微视]-->>秘钥配置SCRET:" + Const.HKWS_GA_OPENAPI_SECRET);
                        logger.info("初始化[贵安-海康微视]-->>秘钥配置APPKEY:" + Const.HKWS_GA_OPENAPI_APPKEY);
                        logger.info("初始化[贵安-海康微视]-->>INTERFACE 默认用户UUID:" + Const.HKWS_GA_DEFAULT_UUID);
                        logger.info("初始化[贵安-海康微视]-->>INTERFACE 获取默认用户UUID接口:" + Const.HKWS_GA_INTERFACE_OPENAPI_SERVICE_BASE_GETDEFAULTUUID);
                        logger.info("初始化[贵安-海康微视]-->>INTERFACE 获取用户接口:" + Const.HKWS_GA_INTERFACE_OPENAPI_SERVICE_BASE_GETUSERS);
                        logger.info("初始化[贵安-海康微视]-->>INTERFACE 获取监控点:" + Const.HKWS_GA_INTERFACE_OPENAPI_SERVICE_VSS_RES_GETCAMERAS);
                        logger.info("初始化[贵安-海康微视]-->>INTERFACE 根据监控点名称获取监控点:" + Const.HKWS_GA_INTERFACE_OPENAPI_SERVICE_VSS_RES_GETCAMERASBYNAME);
                        logger.info("初始化[贵安-海康微视]-->>INTERFACE 获取编码设备:" + Const.HKWS_GA_INTERFACE_OPENAPI_SERVICE_VSS_RES_GETENCODERDEVICESEX);
                        logger.info("初始化[贵安-海康微视]-->>INTERFACE 手动抓图:" + Const.HKWS_GA_INTERFACE_OPENAPI_SERVICE_VSS_PICTURE_BLGCAPTUREPIC);


                        Const.HKWS_TR_URL = PropertiesToolMgr.getPropertiesByKey("hkws.tr.url");
                        Const.HKWS_TR_RES_PORT = PropertiesToolMgr.getPropertiesByKey("hkws.tr.res.port");
                        Const.HKWS_TR_PROXY_URL = PropertiesToolMgr.getPropertiesByKey("hkws.tr.proxy.url");
                        Const.HKWS_TR_RES_PROXY_PORT = PropertiesToolMgr.getPropertiesByKey("hkws.tr.res.proxy.port");
                        Const.HKWS_TR_OPENAPI_HTTP_URL = PropertiesToolMgr.getPropertiesByKey("hkws.tr.openapi.http.url");
                        Const.HKWS_TR_OPENAPI_HTTPS_URL = PropertiesToolMgr.getPropertiesByKey("hkws.tr.openapi.https.url");
                        Const.HKWS_TR_OPENAPI_SECRET = PropertiesToolMgr.getPropertiesByKey("hkws.tr.openapi.secret");
                        Const.HKWS_TR_OPENAPI_APPKEY = PropertiesToolMgr.getPropertiesByKey("hkws.tr.openapi.appkey");
                        Const.HKWS_TR_DEFAULT_UUID = PropertiesToolMgr.getPropertiesByKey("hkws.tr.defalut.uuid");
                        Const.HKWS_TR_INTERFACE_OPENAPI_SERVICE_BASE_GETDEFAULTUUID = PropertiesToolMgr.getPropertiesByKey("hkws.tr.interface.openapi.service.base.getDefaultUserUuid");
                        Const.HKWS_TR_INTERFACE_OPENAPI_SERVICE_BASE_GETUSERS = PropertiesToolMgr.getPropertiesByKey("hkws.tr.interface.openapi.service.base.user.getUsers");
                        Const.HKWS_TR_INTERFACE_OPENAPI_SERVICE_BASE_GETUSERS = PropertiesToolMgr.getPropertiesByKey("hkws.tr.interface.openapi.service.base.user.getUsers");
                        Const.HKWS_TR_INTERFACE_OPENAPI_SERVICE_VSS_RES_GETCAMERAS = PropertiesToolMgr.getPropertiesByKey("hkws.tr.interface.openapi.service.vss.res.getCameras");
                        Const.HKWS_TR_INTERFACE_OPENAPI_SERVICE_VSS_RES_GETCAMERASBYNAME = PropertiesToolMgr.getPropertiesByKey("hkws.tr.interface.openapi.service.vss.res.getCamerasByName");
                        Const.HKWS_TR_INTERFACE_OPENAPI_SERVICE_VSS_RES_GETENCODERDEVICESEX = PropertiesToolMgr.getPropertiesByKey("hkws.tr.interface.openapi.service.vss.res.getEncoderDevicesEx");
                        Const.HKWS_TR_INTERFACE_OPENAPI_SERVICE_VSS_PICTURE_BLGCAPTUREPIC = PropertiesToolMgr.getPropertiesByKey("hkws.tr.interface.openapi.service.vss.picture.blgCapturePic");
                        logger.info("初始化[铜仁-海康微视]-->>海康服务器地址:" + Const.HKWS_TR_URL);
                        logger.info("初始化[铜仁-海康微视]-->>海康服务器视频端口:" + Const.HKWS_TR_RES_PORT);
                        logger.info("初始化[铜仁-海康微视]-->>海康服务器代理地址:" + Const.HKWS_TR_URL);
                        logger.info("初始化[铜仁-海康微视]-->>海康服务器视频代理端口:" + Const.HKWS_TR_RES_PORT);
                        logger.info("初始化[铜仁-海康微视]-->>请求URL地址HTTP:" + Const.HKWS_TR_OPENAPI_HTTP_URL);
                        logger.info("初始化[铜仁-海康微视]-->>请求URL地址HTTPS:" + Const.HKWS_TR_OPENAPI_HTTPS_URL);
                        logger.info("初始化[铜仁-海康微视]-->>秘钥配置SCRET:" + Const.HKWS_TR_OPENAPI_SECRET);
                        logger.info("初始化[铜仁-海康微视]-->>秘钥配置APPKEY:" + Const.HKWS_TR_OPENAPI_APPKEY);
                        logger.info("初始化[铜仁-海康微视]-->>INTERFACE 默认用户UUID:" + Const.HKWS_TR_DEFAULT_UUID);
                        logger.info("初始化[铜仁-海康微视]-->>INTERFACE 获取默认用户UUID接口:" + Const.HKWS_TR_INTERFACE_OPENAPI_SERVICE_BASE_GETDEFAULTUUID);
                        logger.info("初始化[铜仁-海康微视]-->>INTERFACE 获取用户接口:" + Const.HKWS_TR_INTERFACE_OPENAPI_SERVICE_BASE_GETUSERS);
                        logger.info("初始化[铜仁-海康微视]-->>INTERFACE 获取监控点:" + Const.HKWS_TR_INTERFACE_OPENAPI_SERVICE_VSS_RES_GETCAMERAS);
                        logger.info("初始化[铜仁-海康微视]-->>INTERFACE 根据监控点名称获取监控点:" + Const.HKWS_TR_INTERFACE_OPENAPI_SERVICE_VSS_RES_GETCAMERASBYNAME);
                        logger.info("初始化[铜仁-海康微视]-->>INTERFACE 获取编码设备:" + Const.HKWS_TR_INTERFACE_OPENAPI_SERVICE_VSS_RES_GETENCODERDEVICESEX);
                        logger.info("初始化[铜仁-海康微视]-->>INTERFACE 手动抓图:" + Const.HKWS_TR_INTERFACE_OPENAPI_SERVICE_VSS_PICTURE_BLGCAPTUREPIC);


                        Const.HKWS_TJ_URL = PropertiesToolMgr.getPropertiesByKey("hkws.tj.url");
                        Const.HKWS_TJ_RES_PORT = PropertiesToolMgr.getPropertiesByKey("hkws.tj.res.port");
                        Const.HKWS_TJ_PROXY_URL = PropertiesToolMgr.getPropertiesByKey("hkws.tj.proxy.url");
                        Const.HKWS_TJ_RES_PROXY_PORT = PropertiesToolMgr.getPropertiesByKey("hkws.tj.res.proxy.port");
                        Const.HKWS_TJ_OPENAPI_HTTP_URL = PropertiesToolMgr.getPropertiesByKey("hkws.tj.openapi.http.url");
                        Const.HKWS_TJ_OPENAPI_HTTPS_URL = PropertiesToolMgr.getPropertiesByKey("hkws.tj.openapi.https.url");
                        Const.HKWS_TJ_OPENAPI_SECRET = PropertiesToolMgr.getPropertiesByKey("hkws.tj.openapi.secret");
                        Const.HKWS_TJ_OPENAPI_APPKEY = PropertiesToolMgr.getPropertiesByKey("hkws.tj.openapi.appkey");
                        Const.HKWS_TJ_DEFAULT_UUID = PropertiesToolMgr.getPropertiesByKey("hkws.tj.defalut.uuid");
                        Const.HKWS_TJ_INTERFACE_OPENAPI_SERVICE_BASE_GETDEFAULTUUID = PropertiesToolMgr.getPropertiesByKey("hkws.tj.interface.openapi.service.base.getDefaultUserUuid");
                        Const.HKWS_TJ_INTERFACE_OPENAPI_SERVICE_BASE_GETUSERS = PropertiesToolMgr.getPropertiesByKey("hkws.tj.interface.openapi.service.base.user.getUsers");
                        Const.HKWS_TJ_INTERFACE_OPENAPI_SERVICE_BASE_GETUSERS = PropertiesToolMgr.getPropertiesByKey("hkws.tj.interface.openapi.service.base.user.getUsers");
                        Const.HKWS_TJ_INTERFACE_OPENAPI_SERVICE_VSS_RES_GETCAMERAS = PropertiesToolMgr.getPropertiesByKey("hkws.tj.interface.openapi.service.vss.res.getCameras");
                        Const.HKWS_TJ_INTERFACE_OPENAPI_SERVICE_VSS_RES_GETCAMERASBYNAME = PropertiesToolMgr.getPropertiesByKey("hkws.tj.interface.openapi.service.vss.res.getCamerasByName");
                        Const.HKWS_TJ_INTERFACE_OPENAPI_SERVICE_VSS_RES_GETENCODERDEVICESEX = PropertiesToolMgr.getPropertiesByKey("hkws.tj.interface.openapi.service.vss.res.getEncoderDevicesEx");
                        Const.HKWS_TJ_INTERFACE_OPENAPI_SERVICE_VSS_PICTURE_BLGCAPTUREPIC = PropertiesToolMgr.getPropertiesByKey("hkws.tj.interface.openapi.service.vss.picture.blgCapturePic");
                        logger.info("初始化[天津-海康微视]-->>海康服务器地址:" + Const.HKWS_TJ_URL);
                        logger.info("初始化[天津-海康微视]-->>海康服务器视频端口:" + Const.HKWS_TJ_RES_PORT);
                        logger.info("初始化[天津-海康微视]-->>海康服务器代理地址:" + Const.HKWS_TJ_URL);
                        logger.info("初始化[天津-海康微视]-->>海康服务器视频代理端口:" + Const.HKWS_TJ_RES_PORT);
                        logger.info("初始化[天津-海康微视]-->>请求URL地址HTTP:" + Const.HKWS_TJ_OPENAPI_HTTP_URL);
                        logger.info("初始化[天津-海康微视]-->>请求URL地址HTTPS:" + Const.HKWS_TJ_OPENAPI_HTTPS_URL);
                        logger.info("初始化[天津-海康微视]-->>秘钥配置SCRET:" + Const.HKWS_TJ_OPENAPI_SECRET);
                        logger.info("初始化[天津-海康微视]-->>秘钥配置APPKEY:" + Const.HKWS_TJ_OPENAPI_APPKEY);
                        logger.info("初始化[天津-海康微视]-->>INTERFACE 默认用户UUID:" + Const.HKWS_TJ_DEFAULT_UUID);
                        logger.info("初始化[天津-海康微视]-->>INTERFACE 获取默认用户UUID接口:" + Const.HKWS_TJ_INTERFACE_OPENAPI_SERVICE_BASE_GETDEFAULTUUID);
                        logger.info("初始化[天津-海康微视]-->>INTERFACE 获取用户接口:" + Const.HKWS_TJ_INTERFACE_OPENAPI_SERVICE_BASE_GETUSERS);
                        logger.info("初始化[天津-海康微视]-->>INTERFACE 获取监控点:" + Const.HKWS_TJ_INTERFACE_OPENAPI_SERVICE_VSS_RES_GETCAMERAS);
                        logger.info("初始化[天津-海康微视]-->>INTERFACE 根据监控点名称获取监控点:" + Const.HKWS_TJ_INTERFACE_OPENAPI_SERVICE_VSS_RES_GETCAMERASBYNAME);
                        logger.info("初始化[天津-海康微视]-->>INTERFACE 获取编码设备:" + Const.HKWS_TJ_INTERFACE_OPENAPI_SERVICE_VSS_RES_GETENCODERDEVICESEX);
                        logger.info("初始化[天津-海康微视]-->>INTERFACE 手动抓图:" + Const.HKWS_TJ_INTERFACE_OPENAPI_SERVICE_VSS_PICTURE_BLGCAPTUREPIC);


                        Const.HKWS_JJ_URL = PropertiesToolMgr.getPropertiesByKey("hkws.jj.url");
                        Const.HKWS_JJ_RES_PORT = PropertiesToolMgr.getPropertiesByKey("hkws.jj.res.port");
                        Const.HKWS_JJ_PROXY_URL = PropertiesToolMgr.getPropertiesByKey("hkws.jj.proxy.url");
                        Const.HKWS_JJ_RES_PROXY_PORT = PropertiesToolMgr.getPropertiesByKey("hkws.jj.res.proxy.port");
                        Const.HKWS_JJ_OPENAPI_HTTP_URL = PropertiesToolMgr.getPropertiesByKey("hkws.jj.openapi.http.url");
                        Const.HKWS_JJ_OPENAPI_HTTPS_URL = PropertiesToolMgr.getPropertiesByKey("hkws.jj.openapi.https.url");
                        Const.HKWS_JJ_OPENAPI_SECRET = PropertiesToolMgr.getPropertiesByKey("hkws.jj.openapi.secret");
                        Const.HKWS_JJ_OPENAPI_APPKEY = PropertiesToolMgr.getPropertiesByKey("hkws.jj.openapi.appkey");
                        Const.HKWS_JJ_DEFAULT_UUID = PropertiesToolMgr.getPropertiesByKey("hkws.jj.defalut.uuid");
                        Const.HKWS_JJ_INTERFACE_OPENAPI_SERVICE_BASE_GETDEFAULTUUID = PropertiesToolMgr.getPropertiesByKey("hkws.jj.interface.openapi.service.base.getDefaultUserUuid");
                        Const.HKWS_JJ_INTERFACE_OPENAPI_SERVICE_BASE_GETUSERS = PropertiesToolMgr.getPropertiesByKey("hkws.jj.interface.openapi.service.base.user.getUsers");
                        Const.HKWS_JJ_INTERFACE_OPENAPI_SERVICE_BASE_GETUSERS = PropertiesToolMgr.getPropertiesByKey("hkws.jj.interface.openapi.service.base.user.getUsers");
                        Const.HKWS_JJ_INTERFACE_OPENAPI_SERVICE_VSS_RES_GETCAMERAS = PropertiesToolMgr.getPropertiesByKey("hkws.jj.interface.openapi.service.vss.res.getCameras");
                        Const.HKWS_JJ_INTERFACE_OPENAPI_SERVICE_VSS_RES_GETCAMERASBYNAME = PropertiesToolMgr.getPropertiesByKey("hkws.jj.interface.openapi.service.vss.res.getCamerasByName");
                        Const.HKWS_JJ_INTERFACE_OPENAPI_SERVICE_VSS_RES_GETENCODERDEVICESEX = PropertiesToolMgr.getPropertiesByKey("hkws.jj.interface.openapi.service.vss.res.getEncoderDevicesEx");
                        Const.HKWS_JJ_INTERFACE_OPENAPI_SERVICE_VSS_PICTURE_BLGCAPTUREPIC = PropertiesToolMgr.getPropertiesByKey("hkws.jj.interface.openapi.service.vss.picture.blgCapturePic");
                        logger.info("初始化[金建-海康微视]-->>海康服务器地址:" + Const.HKWS_JJ_URL);
                        logger.info("初始化[金建-海康微视]-->>海康服务器视频端口:" + Const.HKWS_JJ_RES_PORT);
                        logger.info("初始化[金建-海康微视]-->>海康服务器代理地址:" + Const.HKWS_JJ_URL);
                        logger.info("初始化[金建-海康微视]-->>海康服务器视频代理端口:" + Const.HKWS_JJ_RES_PORT);
                        logger.info("初始化[金建-海康微视]-->>请求URL地址HTTP:" + Const.HKWS_JJ_OPENAPI_HTTP_URL);
                        logger.info("初始化[金建-海康微视]-->>请求URL地址HTTPS:" + Const.HKWS_JJ_OPENAPI_HTTPS_URL);
                        logger.info("初始化[金建-海康微视]-->>秘钥配置SCRET:" + Const.HKWS_JJ_OPENAPI_SECRET);
                        logger.info("初始化[金建-海康微视]-->>秘钥配置APPKEY:" + Const.HKWS_JJ_OPENAPI_APPKEY);
                        logger.info("初始化[金建-海康微视]-->>INTERFACE 默认用户UUID:" + Const.HKWS_JJ_DEFAULT_UUID);
                        logger.info("初始化[金建-海康微视]-->>INTERFACE 获取默认用户UUID接口:" + Const.HKWS_JJ_INTERFACE_OPENAPI_SERVICE_BASE_GETDEFAULTUUID);
                        logger.info("初始化[金建-海康微视]-->>INTERFACE 获取用户接口:" + Const.HKWS_JJ_INTERFACE_OPENAPI_SERVICE_BASE_GETUSERS);
                        logger.info("初始化[金建-海康微视]-->>INTERFACE 获取监控点:" + Const.HKWS_JJ_INTERFACE_OPENAPI_SERVICE_VSS_RES_GETCAMERAS);
                        logger.info("初始化[金建-海康微视]-->>INTERFACE 根据监控点名称获取监控点:" + Const.HKWS_JJ_INTERFACE_OPENAPI_SERVICE_VSS_RES_GETCAMERASBYNAME);
                        logger.info("初始化[金建-海康微视]-->>INTERFACE 获取编码设备:" + Const.HKWS_JJ_INTERFACE_OPENAPI_SERVICE_VSS_RES_GETENCODERDEVICESEX);
                        logger.info("初始化[金建-海康微视]-->>INTERFACE 手动抓图:" + Const.HKWS_JJ_INTERFACE_OPENAPI_SERVICE_VSS_PICTURE_BLGCAPTUREPIC);




                        //初始化[语音短信]配置
                        PropertiesToolMgr.setFileName("sms.properties");
                        PropertiesToolMgr.initProperties(classLoader);
                        Const.SMS_URL = PropertiesToolMgr.getPropertiesByKey("sms.url");
                        Const.SMS_USERID = PropertiesToolMgr.getPropertiesByKey("sms.userId");
                        Const.SMS_ACTION = PropertiesToolMgr.getPropertiesByKey("sms.action");
                        Const.SMS_ACCOUNT = PropertiesToolMgr.getPropertiesByKey("sms.account");
                        Const.SMS_PASSWORD = PropertiesToolMgr.getPropertiesByKey("sms.password");
                        Const.QRCODE_URL = PropertiesToolMgr.getPropertiesByKey("qrCode.url");

                        logger.info("初始化[短信]-->>短信地址:" + Const.SMS_URL);
                        logger.info("初始化[短信]-->>用户编号:" + Const.SMS_USERID);
                        logger.info("初始化[短信]-->>发送动作:" + Const.SMS_ACTION);
                        logger.info("初始化[短信]-->>短信账号:" + Const.SMS_ACCOUNT);
                        logger.info("初始化[短信]-->>短信密码:" + Const.SMS_PASSWORD);
                        logger.info("初始化[二维码]-->>二维码URL:" + Const.QRCODE_URL);

                        //初始化[农名工接口]路径
                        PropertiesToolMgr.setFileName("worker.properties");
                        PropertiesToolMgr.initProperties(classLoader);
                        Const.WORKER_PERSONPAGEURL = PropertiesToolMgr.getPropertiesByKey("personPage.url");
                        Const.WORKER_PERSONMSGURL = PropertiesToolMgr.getPropertiesByKey("personMsg.url");
                        Const.WORKER_GROUPPAGEURL = PropertiesToolMgr.getPropertiesByKey("groupPage.url");
                        Const.WORKER_PERSONBYGROUPURL = PropertiesToolMgr.getPropertiesByKey("personByGroup.url");
                        Const.WORKER_ATTENDMANAGERURL = PropertiesToolMgr.getPropertiesByKey("attendManager.url");
                        Const.WORKER_ATTENDMANAGERDETAILURL = PropertiesToolMgr.getPropertiesByKey("attendManagerDetail.url");
                        Const.WORKER_ATTENDREPAIRCARD = PropertiesToolMgr.getPropertiesByKey("attendRepairCard.url");
                        Const.WORKER_ATTENDREPAIRCARDUPDATE = PropertiesToolMgr.getPropertiesByKey("attendRepairCardUpdate.url");
                        Const.WORKER_ATTENDREPAIRCARDLIST = PropertiesToolMgr.getPropertiesByKey("attendRepairCardList.url");
                        Const.WORKER_ATTENDREPAIRCARDGETBYID = PropertiesToolMgr.getPropertiesByKey("attendRepairCardGetById.url");
                        Const.WORKER_ATTENDREPAIRGETBYCONDITION = PropertiesToolMgr.getPropertiesByKey("attendRepairCardGetByCardNoAndDate.url");
                        Const.WORKER_ATTENDANCECOUNTBYPROJECTPERSONLIST = PropertiesToolMgr.getPropertiesByKey("attendanceCountByProjectPersonListApi.url");

                        logger.info("初始化[农名工]-->>人员信息列表接口:" + Const.WORKER_PERSONPAGEURL);
                        logger.info("初始化[农名工]-->>人员详细信息接口:" + Const.WORKER_PERSONMSGURL);
                        logger.info("初始化[农名工]-->>组分页接口:" + Const.WORKER_GROUPPAGEURL);
                        logger.info("初始化[农名工]-->>班组详细信息接口:" + Const.WORKER_PERSONBYGROUPURL);
                        logger.info("初始化[农名工]-->>考勤信息接口:" + Const.WORKER_ATTENDMANAGERURL);
                        logger.info("初始化[农名工]-->>考勤详细信息接口:" + Const.WORKER_ATTENDMANAGERDETAILURL);
                        logger.info("初始化[农名工]-->>补卡保存接口:" + Const.WORKER_ATTENDREPAIRCARD);
                        logger.info("初始化[农名工]-->>补卡更新保存接口:" + Const.WORKER_ATTENDREPAIRCARDUPDATE);
                        logger.info("初始化[农名工]-->>补卡列表接口:" + Const.WORKER_ATTENDREPAIRCARDLIST);
                        logger.info("初始化[农名工]-->>补卡根据id查询接口:" + Const.WORKER_ATTENDREPAIRCARDGETBYID);
                        logger.info("初始化[农名工]-->>补卡根据条件查询接口:" + Const.WORKER_ATTENDREPAIRGETBYCONDITION);
                        logger.info("初始化[农名工]-->>农名工考勤月统计信息接口:" + Const.WORKER_ATTENDANCECOUNTBYPROJECTPERSONLIST);

                        //初始化[一体化接口]路径
                        PropertiesToolMgr.setFileName("yth.properties");
                        PropertiesToolMgr.initProperties(classLoader);
                        Const.YTH_LOGIN_URL = PropertiesToolMgr.getPropertiesByKey("yth.login.url");

                        logger.info("初始化[一体化接口]-->>一体化登陆接口:" + Const.YTH_LOGIN_URL);

//                        //初始化[遵义微乐接口]路径
                        PropertiesToolMgr.setFileName("zywl.properties");
                        PropertiesToolMgr.initProperties(classLoader);
                        Const.ZYWL_GETGATEINFO = PropertiesToolMgr.getPropertiesByKey("getGateInfo.url");
                        Const.ZYWL_CHECKUSERTICKET = PropertiesToolMgr.getPropertiesByKey("checkUserTicket.url");
                        Const.ZYWL_UPDATEOUTOFUSERTICKET = PropertiesToolMgr.getPropertiesByKey("updateOutOfUserTicket.url");

                        logger.info("初始化[一体化接口]-->>一体化登陆接口:" + Const.YTH_LOGIN_URL);

                        PropertiesToolMgr.setFileName("minio.properties");
                        PropertiesToolMgr.initProperties(classLoader);
                        Const.MINIO_ENDPOINT = PropertiesToolMgr.getPropertiesByKey("minio.endpoint");
                        Const.MINIO_PORT = Integer.parseInt(PropertiesToolMgr.getPropertiesByKey("minio.port"));
                        Const.MINIO_ACCESSKEY = PropertiesToolMgr.getPropertiesByKey("minio.accessKey");
                        Const.MINIO_SECRETKEY = PropertiesToolMgr.getPropertiesByKey("minio.secretKey");
                        Const.MINIO_BUCKETNAME = PropertiesToolMgr.getPropertiesByKey("minio.bucketname");
                        logger.info("初始化[minio]-->>上传域名:" + Const.MINIO_ENDPOINT);
                        logger.info("初始化[minio]-->>上传端口:" + Const.MINIO_PORT);
                        logger.info("初始化[minio]-->>秘钥key:" + Const.MINIO_ACCESSKEY);
                        logger.info("初始化[minio]-->>秘钥值:" + Const.MINIO_SECRETKEY);
                        logger.info("初始化[minio]-->>存储空间名称(桶名):" + Const.MINIO_BUCKETNAME);


                        //初始化[服务器URL]配置
                        PropertiesToolMgr.setFileName("server.properties");
                        PropertiesToolMgr.initProperties(classLoader);
                        Constants.WEATHER_URL = PropertiesToolMgr.getPropertiesByKey("WEATHER.URL");
                        Constants.ENVIRDEVICES_URL = PropertiesToolMgr.getPropertiesByKey("ENVIRDEVICES.URL");
                        Constants.CAMERADEVICE_URL = PropertiesToolMgr.getPropertiesByKey("CAMERADEVICE.URL");
                        logger.info("初始化[服务器URL]-->>WEATHER_URL:" + Constants.WEATHER_URL);
                        logger.info("初始化[服务器URL]-->>ENVIRDEVICES_URL:" + Constants.ENVIRDEVICES_URL);

                        //初始化[wisdomsite配置]配置
                        PropertiesToolMgr.setFileName("wisdomsite.properties");
                        PropertiesToolMgr.initProperties(classLoader);
                        Constants.ZSD_COMPANY_SITEWEB = PropertiesToolMgr.getPropertiesByKey("wisdomsite.company.siteweb");
                        Constants.ZSD_COMPANY_SITEWEB_URL = PropertiesToolMgr.getPropertiesByKey("wisdomsite.company.siteweb.url");
                        Constants.ZSD_COMPANY_NAME = PropertiesToolMgr.getPropertiesByKey("wisdomsite.company.name");
                        Constants.ZSD_COMPANY_USERNAME_FIX = PropertiesToolMgr.getPropertiesByKey("wisdomsite.company.username.fix");
                        Constants.ZSD_COMPANY_PHONE = PropertiesToolMgr.getPropertiesByKey("wisdomsite.company.phone");
                        Constants.ZSD_COMPANY_PHONE_SERVICETIME = PropertiesToolMgr.getPropertiesByKey("wisdomsite.company.phone.servicetime");
                        Constants.ZSD_COMPANY_HOTLINE = PropertiesToolMgr.getPropertiesByKey("wisdomsite.company.hotline");
                        Constants.ZSD_COMPANY_TAKENUMBER = PropertiesToolMgr.getPropertiesByKey("wisdomsite.company.takenumber");
                        Constants.ZSD_COMPANY_CALCULATE_URL = Constants.WEATHER_URL + PropertiesToolMgr.getPropertiesByKey("wisdomsite.company.calulate.url");
                        Constants.ZSD_COMPANY_ONLINECUSTOMER = PropertiesToolMgr.getPropertiesByKey("wisdomsite.company.onliecustomer");
                        Constants.ZSD_COMPANY_SERVICE_EMAIL = PropertiesToolMgr.getPropertiesByKey("wisdomsite.company.service.email");
                        Constants.ZSD_COMPANY_SERVICE_EMAIL_HOST = PropertiesToolMgr.getPropertiesByKey("wisdomsite.company.service.email.host");
                        Constants.ZSD_COMPANY_SERVICE_EMAIL_PORT = PropertiesToolMgr.getPropertiesByKey("wisdomsite.company.service.email.port");
                        Constants.ZSD_COMPANY_SERVICE_EMAIL_SENDER = PropertiesToolMgr.getPropertiesByKey("wisdomsite.company.service.email.sender");
                        Constants.ZSD_COMPANY_SERVICE_EMAIL_PASSWORD = PropertiesToolMgr.getPropertiesByKey("wisdomsite.company.service.email.password");
                        Constants.ZSD_COMPANY_SERVICE_EMAIL_ALIAS = PropertiesToolMgr.getPropertiesByKey("wisdomsite.company.service.email.alias");
                        Constants.ZSD_COMPANY_SERVER_MESSAGE_PASSWORD = PropertiesToolMgr.getPropertiesByKey("wisdomsite.company.server.message.password");
                        Constants.ZSD_COMPANY_SERVER_IP = PropertiesToolMgr.getPropertiesByKey("wisdomsite.company.server.ip");
                        Constants.ZSD_COMPANY_SERVER_AK = PropertiesToolMgr.getPropertiesByKey("wisdomsite.company.server.ak");

                        //分享常量
                        Constants.ZSD_SHARE_TITLE = PropertiesToolMgr.getPropertiesByKey("wisdomsite.share.title");
                        Constants.ZSD_SHARE_SUBTITLE = PropertiesToolMgr.getPropertiesByKey("wisdomsite.share.subTitle");
                        Constants.ZSD_SHARE_ICONURL = PropertiesToolMgr.getPropertiesByKey("wisdomsite.share.iconUrl");
                        Constants.ZSD_SHARE_DETAILURL = PropertiesToolMgr.getPropertiesByKey("wisdomsite.share.detailUrl");

                        //分享常量
                        Constants.ZSD_SHARE_TITLE_ACT_TV= PropertiesToolMgr.getPropertiesByKey("wisdomsite.share.act.tv.title");
                        Constants.ZSD_SHARE_SUBTITLE_ACT_TV = PropertiesToolMgr.getPropertiesByKey("wisdomsite.share.act.tv.subTitle");
                        Constants.ZSD_SHARE_ICONURL_ACT_TV = PropertiesToolMgr.getPropertiesByKey("wisdomsite.share.act.tv.iconUrl");
                        Constants.ZSD_SHARE_DETAILURL_ACT_TV = PropertiesToolMgr.getPropertiesByKey("wisdomsite.share.act.tv.detailUrl");

                        logger.info("初始化[wisdomsite配置]-->>官网:" + Constants.ZSD_COMPANY_SITEWEB);
                        logger.info("初始化[wisdomsite配置]-->>官网地址:" + Constants.ZSD_COMPANY_SITEWEB_URL);
                        logger.info("初始化[wisdomsite配置]-->>公司名称:" + Constants.ZSD_COMPANY_NAME);
                        logger.info("初始化[wisdomsite配置]-->>用户名前缀:" + Constants.ZSD_COMPANY_USERNAME_FIX);
                        logger.info("初始化[wisdomsite配置]-->>400服务热线:" + Constants.ZSD_COMPANY_PHONE);
                        logger.info("初始化[wisdomsite配置]-->>400服务热线时间:" + Constants.ZSD_COMPANY_PHONE_SERVICETIME);
                        logger.info("初始化[wisdomsite配置]-->>公司电话:" + Constants.ZSD_COMPANY_HOTLINE);
                        logger.info("初始化[wisdomsite配置]-->>订阅号:" + Constants.ZSD_COMPANY_TAKENUMBER);
                        logger.info("初始化[wisdomsite配置]-->>收益计算器:" + Constants.ZSD_COMPANY_CALCULATE_URL);
                        logger.info("初始化[wisdomsite配置]-->>在线客服:" + Constants.ZSD_COMPANY_ONLINECUSTOMER);
                        logger.info("初始化[wisdomsite配置]-->>企业邮箱:" + Constants.ZSD_COMPANY_SERVICE_EMAIL);
                        logger.info("初始化[wisdomsite配置]-->>企业邮箱主机:" + Constants.ZSD_COMPANY_SERVICE_EMAIL_HOST);
                        logger.info("初始化[wisdomsite配置]-->>企业邮箱端口:" + Constants.ZSD_COMPANY_SERVICE_EMAIL_PORT);
                        logger.info("初始化[wisdomsite配置]-->>邮箱发送者:" + Constants.ZSD_COMPANY_SERVICE_EMAIL_SENDER);
                        logger.info("初始化[wisdomsite配置]-->>邮箱发送密码:" + Constants.ZSD_COMPANY_SERVICE_EMAIL_PASSWORD);
                        logger.info("初始化[wisdomsite配置]-->>邮箱发送昵称:" + Constants.ZSD_COMPANY_SERVICE_EMAIL_ALIAS);
                        logger.info("初始化[wisdomsite配置]-->>服务通信密码:" + Constants.ZSD_COMPANY_SERVER_MESSAGE_PASSWORD);
                        logger.info("初始化[wisdomsite配置]-->>IP库识别:" + Constants.ZSD_COMPANY_SERVER_IP);

                        logger.info("初始化[wisdomsite配置]-->>分享标题:" + Constants.ZSD_SHARE_TITLE);
                        logger.info("初始化[wisdomsite配置]-->>分享摘要:" + Constants.ZSD_SHARE_SUBTITLE);
                        logger.info("初始化[wisdomsite配置]-->>分享icon url:" + Constants.ZSD_SHARE_ICONURL);
                        logger.info("初始化[wisdomsite配置]-->>分享详情url:" + Constants.ZSD_SHARE_DETAILURL);

                        //初始化[系统列表序列]配置
                        PropertiesToolMgr.setFileName("sysSequence.properties");
                        PropertiesToolMgr.initProperties(classLoader);
                        Const.COCODE_SEQ = PropertiesToolMgr.getPropertiesByKey("contract.seq");
                        Const.PURCODE_CGN_SEQ = PropertiesToolMgr.getPropertiesByKey("purcode.cgn.seq");
                        Const.PURCODE_CGW_SEQ = PropertiesToolMgr.getPropertiesByKey("purcode.cgw.seq");
                        Const.STICODE_RKN_SEQ = PropertiesToolMgr.getPropertiesByKey("sticode.rkn.seq");
                        Const.STICODE_RKW_SEQ = PropertiesToolMgr.getPropertiesByKey("sticode.rkw.seq");
                        Const.STICODE_RKT_SEQ = PropertiesToolMgr.getPropertiesByKey("sticode.rkt.seq");
                        Const.STOCODE_SEQ = PropertiesToolMgr.getPropertiesByKey("stocode.seq");
                        logger.info("初始化[系统列表序列]-->>合同单号序列:" + Const.COCODE_SEQ);
                        logger.info("初始化[系统列表序列]-->>采购单号（合同内）:" + Const.PURCODE_CGN_SEQ);
                        logger.info("初始化[系统列表序列]-->>采购单号（合同外）:" + Const.PURCODE_CGW_SEQ);
                        logger.info("初始化[系统列表序列]-->>入库单号（合同内）:" + Const.STICODE_RKN_SEQ);
                        logger.info("初始化[系统列表序列]-->>入库单号（合同外）:" + Const.STICODE_RKW_SEQ);
                        logger.info("初始化[系统列表序列]-->>入库单号（填写）:" + Const.STICODE_RKT_SEQ);
                        logger.info("初始化[系统列表序列]-->>出库单号:" + Const.STOCODE_SEQ);

                } catch (Exception e) {
                        e.printStackTrace();
                        logger.error("上下文初始化-->>contextInitialized-->>初始化异常Exception " + e.getMessage());
                }
                        logger.info("上下文初始化-->>contextInitialized-->>结束");
        }

}
